Author Topic: O2 dialog editor  (Read 2279 times)

0 Members and 1 Guest are viewing this topic.

Nicola

  • Guest
Re: O2 dialog editor
« Reply #15 on: September 22, 2020, 05:38:04 AM »
@Charles.
Hi. I have seen this program (projectsB\IUP\Scanf1.o2bas). Very interesting.
But I noticed that there are two functions with the same name ... or am I wrong?

Code: [Select]
function ReplaceBN(char*fmt) as string
How come they don't produce an error?

When I click on the color button the program crashes and kicks me out. And even the multiline doesn't work ... only one line comes out ...
« Last Edit: September 22, 2020, 05:48:48 AM by Nicola »

JRS

  • Guest
Re: O2 dialog editor
« Reply #16 on: September 22, 2020, 10:52:37 AM »
The Scanf1.o2bas program doesn't run for me. Other O2 IUP examples seem to work fine.

IUP strings should be null terminated. With some languages you need to use IupStoreAttribute rather than IupSetAttribute with string passing.

Hint: when I run into a strange IUP issue I'll revert to trying it in C before declaring a bug.
« Last Edit: September 22, 2020, 02:53:31 PM by John »

Charles Pegge

  • Guest
Re: O2 dialog editor
« Reply #17 on: September 22, 2020, 03:59:49 PM »
Hi Nicola,

function overrides are allowed in o2. If the prototypes are identical then the last function defined will be used.

The color button should bring up the color pdialog box. The problem may be with the IUP.dll version included vs windows10. I think it worked previously.
« Last Edit: September 22, 2020, 04:08:45 PM by Charles Pegge »

JRS

  • Guest
Re: O2 dialog editor
« Reply #18 on: September 25, 2020, 08:10:54 PM »
The MonoDevelopment IDE source code may be a good resouce for your O2 project.

Web Site
« Last Edit: September 26, 2020, 04:32:22 AM by John »

Nicola

  • Guest
Re: O2 dialog editor
« Reply #19 on: October 05, 2020, 06:19:07 AM »
Hi Charles

"function overrides are allowed in o2. If the prototypes are identical then the last function defined will be used."

This possibility is wonderful. So I could write a function ... then I write another with the same name, for example to try a different way of handling a given problem, and this replaces the previous one without creating problems. Quite right?

JRS

  • Guest
Re: O2 dialog editor
« Reply #20 on: October 05, 2020, 01:13:38 PM »
This O2 feature could also be the foundation for variant support.

Or polymorphism towards an OOP direction.

 
« Last Edit: October 05, 2020, 01:42:03 PM by John »

Charles Pegge

  • Guest
Re: O2 dialog editor
« Reply #21 on: October 06, 2020, 02:15:03 PM »

Yes Nicola, you can override functions and most other symbols, but be careful.