|
Post by Marco Kurvers on May 6, 2022 16:47:20 GMT -5
By open a graphics window, I noticed that the command 'graphics' is not blue, but the name 'graphic' turns blue while that is not the right command.
Greetings, Marco
|
|
|
Post by Carl Gundel on May 6, 2022 19:51:16 GMT -5
By open a graphics window, I noticed that the command 'graphics' is not blue, but the name 'graphic' turns blue while that is not the right command. It’s tricky to explain but the commands after a handle are interpreted at runtime and not determined by the compiler. It is a challenge to know what is a ‘proper’ command when coloring in the editor. I may figure out something later, but this effort will probably have to wait for v5.1. 😉
|
|
|
Post by Marco Kurvers on May 7, 2022 3:48:18 GMT -5
Yes, I know that, but the command 'graphics' is now a variable. I can say 'graphics = 10' without an error, but 'graphic = 10' is a syntax error. The name 'graphic' is not a command. This is not good. In LB 4 'graphics' is blue and you will get an error if you say 'graphics = 10'.
An another problem that I saw is the function 'hwnd()'.
LB 5 sees the function as a variable, so a line like 'hCtrl = hwnd(#w.btn)' no longer works. Programming with 'calldll' is therefore not yet possible, because handles are needed.
|
|
|
Post by Carl Gundel on May 7, 2022 8:15:27 GMT -5
Yes, I know that, but the command 'graphics' is now a variable. I can say 'graphics = 10' without an error, but 'graphic = 10' is a syntax error. The name 'graphic' is not a command. This is not good. In LB 4 'graphics' is blue and you will get an error if you say 'graphics = 10'. An another problem that I saw is the function 'hwnd()'. LB 5 sees the function as a variable, so a line like 'hCtrl = hwnd(#w.btn)' no longer works. Programming with 'calldll' is therefore not yet possible, because handles are needed. graphic is a reserved word in LB5, so you can't use it was a variable. You cannot yet get the handle of controls in LB5 because they are not native widgets. The goal is to eventually have native widgets as an option.
|
|
|
Post by Marco Kurvers on May 7, 2022 11:26:04 GMT -5
I don't understand. How can I use a calldll with a handle as a parameter in LB 5 if I can't get the number of a handle from a window or a control? For example, GetParent must have the handle of a control to get the parent of a window.
|
|
|
Post by Carl Gundel on May 7, 2022 11:55:11 GMT -5
I don't understand. How can I use a calldll with a handle as a parameter in LB 5 if I can't get the number of a handle from a window or a control? For example, GetParent must have the handle of a control to get the parent of a window. LB5 uses emulated controls as part of it's cross platform strategy. For now you can only the window handles for the parent window itself. Later on we plan to add native controls for Windows and Mac OS. In the meantime to compensate for the loss of being able to make API calls on the GUI controls we are adding more commands/capabilities to the controls. What exactly are you trying to do with your API calls?
|
|
|
Post by Marco Kurvers on May 8, 2022 6:44:50 GMT -5
Simple, there are things that can't in LB. The only possibility is to use a API function, for example to change the title of the window. An another problem is by using a control as the ListView. LB has not a command ListView. By using the API functions, you must use the hwnd() function for the caldll.
By native controls, do you mean that we can later call these controls as normal commands and then use the properties as the string calls have also disappeared? So now we can't use an API for a while, because the hwnd() function doesn't work.
Thus we must later have a normal ListView command instead what we now must do with the API calls.
|
|
|
Post by Rod on May 8, 2022 10:59:57 GMT -5
Liberty 5 is going to give us cross platform widgets that will have built in functionality like changing the title. We will even get a grid widget.
The point about these widgets is that they will be similar across all platforms.
The API you speak of is Windows specific which kinda cuts across the design criteria.
|
|
|
Post by Marco Kurvers on May 15, 2022 13:57:26 GMT -5
Do you mean that we can use all the Windows controls as what you call widgets in the same way as in Visual Basic? Of course without the design editor.
|
|