New Error

Xbase++ 2.0 Build 554 or later
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4775
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: New Error

#21 Post by rdonnay »

Are these resources in a .RES file?

Are they .BMP files?

Are they .ICO files?

Show me your source so I can figure out what's going on.
The eXpress train is coming - and it has more cars.

omni
Posts: 547
Joined: Thu Jan 28, 2010 9:34 am

Re: New Error

#22 Post by omni »

Do you mean the buttons? From the .res file.
On our main menu.. Buttons always work as expected.

DC_AddButtonConfig(DCGUI_BUTTON_OK,BITMAP_OK_1,80,30)
DC_AddButtonConfig(DCGUI_BUTTON_CANCEL,BITMAP_CANCEL_1,80,30)

Ex: This particular one below had 3 error logs yesterday afternoon, used maybe 200 times at least. Just a standard scan used by billing clerks.
Nothing since then or before then on that program.

DCREAD GUI FIT ADDBUTTONS TO lOk MODAL TITLE 'Select Pro' ;
SETFOCUS @ XSCAN OPTIONS GETOPTIONS

Any chance its some sort of memory issue when it gets busier in the afternoon?

User avatar
rdonnay
Site Admin
Posts: 4775
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: New Error

#23 Post by rdonnay »

Any chance its some sort of memory issue when it gets busier in the afternoon?
I really don't know.
You say that the IDSC is always on the destroy() in _IsIcon().

This code tests where the resource is an icon or a bitmap because each uses a different Xbp* class to load the resource or file.

That code always worked before.

I want you to make the following change in _DCGETBX.PRG and rebuild DCLIPX.DLL:

Code: Select all

If ValType(nResource) = "N"
   RETURN .f.
   // lStatus     := oIcon:load(cResFile,nResource,nXsize,nYsize)
Else
This will bypass the code that tests whether a resource is an icon.
I suspect that trying to load a resource that is not an icon is destabilizing the application.
If this works, then I will need to develop another method to determine if a resource is an icon or a bitmap.
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4775
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: New Error

#24 Post by rdonnay »

Ok, I found something in the code that should negate any reason to make any changes at all to _DCGETBX.PRG.

Now, I suggest that you use an undocumented eXpress++ function at the beginning of your app.

This will block out only a set of icons that are valid in your application and bypass the code that tests to see if it is a good icon.
This was put in there specifically to prevent the kind of problems you are having.

I recommend that your restore your original _DCGETBX.PRG to what it was in the distribution.
Add the following to the start of your application:

Code: Select all

DC_SetIconResource(1,100)  
This should invalidate any resource higher than 100 as not being an icon.

I will add documentation in the next build.
The eXpress train is coming - and it has more cars.

omni
Posts: 547
Joined: Thu Jan 28, 2010 9:34 am

Re: New Error

#25 Post by omni »

Is that specific to 2.0, or can it be used for both. (As long as i will not cause an error on 1.9 or earlier express that it does not understand the command)

User avatar
rdonnay
Site Admin
Posts: 4775
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: New Error

#26 Post by rdonnay »

It will work for both 1.9 and 2.0.
The eXpress train is coming - and it has more cars.

omni
Posts: 547
Joined: Thu Jan 28, 2010 9:34 am

Re: New Error

#27 Post by omni »

The older express version apparently do not, which is what most users currently have, or maybe 1.9 does not.

I added an if/endif for version but it would not compile in 1.9 on older express versions, just a couple down, which is at most sites.

I added:

#if XPPVER < 2000000

#else
#DC_SetIconResource(1,100)
#endif

Will that even work? It compiles in any version but not sure it does anything.

I do not use the #if much....


Thanks

User avatar
rdonnay
Site Admin
Posts: 4775
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: New Error

#28 Post by rdonnay »

I was assuming that you were still using eXpress++ build 263 for 1.9.

Apparently, you are using a much older version.
The eXpress train is coming - and it has more cars.

omni
Posts: 547
Joined: Thu Jan 28, 2010 9:34 am

Re: New Error

#29 Post by omni »

Using 262 on 1.9 and 2.0, so neither will compile. Is this something I can add to my my app code to make it so all users will not need to be updated, or will I need to just update to 263.

User avatar
rdonnay
Site Admin
Posts: 4775
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: New Error

#30 Post by rdonnay »

DC_SetIconResource() has been in eXpress++ since build 260.

I don't know why you can't compile unless you have an older version of DCLIPX.LIB that is in your SET LIB path.
It would have to be older than 10/28/2014.
The eXpress train is coming - and it has more cars.

Post Reply