Page 1 of 1

[PubTitle] variable bugged ? [Solved]

PostPosted: Sun Oct 13, 2013 11:09 pm
by UltraVox
Hi all,

I just found a strange "bug" in my NeoBook program, using the [PubTitle] command. Look at the following screens and tell me what you think...

Locally, all is well.
We can clearly see the two [PubTitle]variables. One is in the "Help" menu, and the other is in the context of the application.
Image

Where it gets weird is after compilation :
Image

In the menu, the [PubTitle] variable turned into "WorkForm".

Someone has an idea of the problem ?
This is very strange...

Thanks all.
UltraVox

Re: [PubTitle] command bugged ?

PostPosted: Mon Oct 14, 2013 1:43 am
by HPW
When you have in Book\Properties\General\Title entered the string 'Workform' or use elsewhere a 'SetVar "[PubTitle]" "Workform" then it will appear everywhere you use it.

And [PubTitle] is not a command, it is a global variable from neobook with read/write support.

Re: [PubTitle] command bugged ?

PostPosted: Mon Oct 14, 2013 1:52 am
by UltraVox
Hi HPW,

Thank you, but I am perfectly aware of it.

In Project > Project Properties > General > Title, I wrote manually : Image Works Converter (Beta 1)
There is no variable here, but just text.

And "WorkForm" is a term unknown to me. I did not use that word around my publication.

The problem is there...

Look at the top left of this picture :
Image

The evidence is that : the title of the application has nothing to do with "WorkForm". :)

Re: [PubTitle] command bugged ?

PostPosted: Mon Oct 14, 2013 3:48 am
by UltraVox
For information, I opened my .pub file with Notpad++ and I searched "WorkForm".
No result ! No trace of it in the .pub (Irrefutable evidence that it does not exist in my publication).

Accordingly, I consider that there are only two possibilities :

1/ A plugin conflicts with NeoBook and changes the global variable [PubTitle]. Wow, what interference !
But then how do you explain this :
The global variable [PubTitle] normally appears in the window of my application, but transformed into "WorkForm" in the Windows Menu (only here) of my application. But, a plugin can it interfere and change the global variable only if it is in the application menu ?

2/ A problem occurs when compiling (to do with Dave).
Dave, can you do a simple test to confirm, please ?

Thanks.
UltraVox

Re: [PubTitle] command bugged ?

PostPosted: Mon Oct 14, 2013 4:24 am
by dec
Hello,

Maybe "Workform" do not appear in your publication but become from some place in runtime... Maybe you can search for "PubTitle" as well. On the other hand, I can't imagine a plugin who want to change the "[PubTitle]" variable without the user interaction. Better said, I am thinking on my own plugins, which never change such variable, but, have some actions that a user can use to set or update a variable when needed, never "PubTitle" in particular.

I know this do not help you too much... but it's the only thing I can say for now.

Re: [PubTitle] command bugged ?

PostPosted: Mon Oct 14, 2013 5:25 am
by mishem
Indeed there is a problem. No matter where the variable is inserted in the main menu.

Image

Re: [PubTitle] command bugged ?

PostPosted: Mon Oct 14, 2013 5:32 am
by dec
Hello,

I confirm the problem when use "[PubTitle]" on the Main Menu and also on the System Tray Menu.

Image

Image

Of course a possible workaround is just to use another variable instead of "[PubTitle]" in these places.

Re: [PubTitle] command bugged ?

PostPosted: Mon Oct 14, 2013 7:30 am
by UltraVox
Ok, I'm already reassured to know that it's not just my computer...
Yes of course you can use any variable for that. But I think it's better than Dave's knowledge, so that he can rectify in the next Update.

Thank you all ;)

Sincerely,
UltraVox

Re: [PubTitle] command bugged ?

PostPosted: Mon Oct 14, 2013 7:51 am
by dec
UltraVox wrote:Ok, I'm already reassured to know that it's not just my computer...
Yes of course you can use any variable for that. But I think it's better than Dave's knowledge, so that he can rectify in the next Update.

Thank you all ;)

Sincerely,
UltraVox


+1

Re: [PubTitle] command bugged ? (for Dave)

PostPosted: Mon Oct 14, 2013 10:56 am
by Neosoft Support
You're right, for some inexplicable reason when the variable [PubTitle] is used in the menu it displays as "WorkForm". I will make sure this is added to the list of things to correct in the next update.

In the meantime, you can workaround the problem by placing the following code in your pub's Start Up action:

Code: Select all
SetVar "[PubTitle]" "[PubTitle]"


This will reset the variable and update the menu when the app starts.

Sorry for the inconvenience.

Re: [PubTitle] command bugged ? (for Dave)

PostPosted: Mon Oct 14, 2013 11:19 am
by UltraVox
Thank you Dave for this solution.
And there is no inconvenience, just a lot of curiosity ;)

Sincerely,
UltraVox