xsharp.eu • XIDE 1.1.5
Page 1 of 2

XIDE 1.1.5

Posted: Wed Dec 05, 2018 11:43 am
by Karl-Heinz
Hi Chris,

When i place a DataListView on a form and select as the "Server" value "<Share Owner´s>" this code is generated.

SELF:oDCDataListView1:Server := <Share Owner's>{}

regards
Karl-Heinz

XIDE 1.1.5

Posted: Wed Dec 05, 2018 8:30 pm
by Chris
Hi Karl-Heinz,

Thanks, I see the problem. I checked what VO does and it does not offer at all the option <Share Owner's> for DataListView controls, so I guess that's what XIDE should do as well. Or have I overlooked something?

Chris

XIDE 1.1.5

Posted: Wed Dec 05, 2018 10:17 pm
by FFF
Given, that the DLV was a more or less replacement for SubDatawindow with Browser, i'd correct the code to allow "using" the owner's server like other controls do.

My .2
Karl

XIDE 1.1.5

Posted: Thu Dec 13, 2018 8:35 am
by Karl-Heinz
Hi Chris,

there´s a problem with the numbering of menu IDs.

i´ve created two popup menus, and as you can see the IDs always start with 15001

Code: Select all


#define IDM_menBrowser "menBrowser"
#define IDM_menBrowser_Dummy_ID 15001
#define IDM_menBrowser_Dummy_Datalistview_Browser_ID 15002
#define IDM_menBrowser_Dummy_Databrowser_ID 15003
menBrowser MENU
BEGIN
	POPUP "Dummy"
	BEGIN
		MENUITEM "Datalistview Browser" , IDM_menBrowser_Dummy_Datalistview_Browser_ID
		MENUITEM "Databrowser" , IDM_menBrowser_Dummy_Databrowser_ID
	END
END

// ----------

#define IDM_menFieldget "menFieldget"
#define IDM_menFieldget_Dummy_ID 15001
#define IDM_menFieldget_Dummy_Fieldget_by_num_ID 15002
#define IDM_menFieldget_Dummy_Fieldget_by_string_ID 15003
#define IDM_menFieldget_Dummy_Fieldget_by_symbol_ID 15004
menFieldget MENU
BEGIN
	POPUP "Dummy"
	BEGIN
		MENUITEM "Fieldget by num" , IDM_menFieldget_Dummy_Fieldget_by_num_ID
		MENUITEM "Fieldget by string" , IDM_menFieldget_Dummy_Fieldget_by_string_ID
		MENUITEM "Fieldget by symbol" , IDM_menFieldget_Dummy_Fieldget_by_symbol_ID
	END
END

so later it´s not possible to distinguish which menuitem has been clicked.

Code: Select all


METHOD MenuCommand ( oEvent )
LOCAL nItemID AS LONG

	
	SUPER:MenuCommand ( oEvent )

	nItemID := oEvent:ItemID
	
		
	
	DO CASE
		

	CASE nItemID == IDM_menFieldget_Dummy_Fieldget_by_symbol_ID 
		
		SELF:ShowFieldgetResults ( 1 )
		
		
	CASE nItemID == IDM_menFieldget_Dummy_Fieldget_by_num_ID 
		
		SELF:ShowFieldgetResults ( 2 ) 
		
		
	CASE nItemID == IDM_menFieldget_Dummy_Fieldget_by_string_ID
		
		
		SELF:ShowFieldgetResults ( 3 )
		
		
	CASE nItemID == IDM_menBrowser_Dummy_Datalistview_Browser_ID

		SELF:ShowDataListviewBrowser ()
		

	CASE nItemID == IDM_menBrowser_Dummy_Databrowser_ID
		
	     SELF:ShowDataBrowser ()

	ENDCASE	
	
	RETURN SELF

For the moment there seems to be no workaround.

1. changing the define numbers in the rc file directly has no effect.
2. Also adding a number to the "ID" Property in the menu painter seems to be ignored.

regards
Karl-Heinz

XIDE 1.1.5

Posted: Thu Dec 13, 2018 5:55 pm
by lumberjack
Karl-Heinz,
Just out of curiosity, did you consider using the .NET alternative yet? Or are you trying to keep VO compatibility?

Regards,

XIDE 1.1.5

Posted: Thu Dec 13, 2018 11:22 pm
by Chris
Hi Karl-Heinz,

Thanks, I see the problem and I am surprised I had not taken care of this earlier! I thought I remembered that I had added an option to specify the base DEFINE value, but that's nowhere to be found in the code :). Maybe I had done this for an earlier version of the editor...Anyway, I will add this, so the problem should be solved. Will include it in the next X# release which should be soon enough (we're facing some issues though, so I think it will take a few more days).

About the "ID" property, I had it in the todo list to sometime check what VO is using that for, but never gotten to do that. It seems to be very rarely used in VO menus, so I was ignoring it for now, but will have a look now, given this opportunity.

Chris

XIDE 1.1.5

Posted: Fri Dec 14, 2018 5:04 am
by wriedmann
Hi Chris,

do you plan to work on XIDE these days? Then I have another one thing: the editor for the VO style windows sometime changes the tab order on complex windows.
Let me explain: I have some relatively complex windows with more than 50 controls. The tab order for these needs to be set manually (and I do that as it is very important). If I then add other controls, they are not added after the last ones, but somewhere in the middle, and other controls loose their position. So it is not enough to move the new controls to their desired position, but I need to set again the tab order for the entire window.

Wolfgang

XIDE 1.1.5

Posted: Fri Dec 14, 2018 8:39 am
by Karl-Heinz
lumberjack wrote:Karl-Heinz,
Just out of curiosity, did you consider using the .NET alternative yet? Or are you trying to keep VO compatibility?

Regards,
I hammer on the x# runtime, the x# VO SDK dlls and the X# dbfntx driver - at the same time :-)

regards
Karl-Heinz

XIDE 1.1.5

Posted: Fri Dec 14, 2018 10:40 am
by Karl-Heinz
Hi Chris,

i´ve found a workaround: In the MenuInit() oEvent:Menu isn´t empty, so i can store the class name and detect in the MenuCommand() which menu was opened.

About the Menu property "ID". Honestly, i never used it in VO, and i think it has very low priority. My first thought was, because XIDE shows a sle instead of a combobox, to type in a individual ID number ...


the VO help about the "ID" property:

[...]
Choose an internally-defined resource ID for a menu item. If you do not specify an ID using this property, the Menu Editor will generate a unique ID number and name for it. Choosing this property activates the Menu ID dialog box from which you can choose one of several internally defined resource IDs. This allows you to assign the same ID to the same menu items in different menu structures, thereby reducing the Windows resources necessary to display the menu.
[...]

regards
Karl-Heinz

XIDE 1.1.5

Posted: Fri Dec 14, 2018 2:09 pm
by Chris
Hi Wolfgang,

Can you please send me a .wed file for such a window? I also have windows with a lot of controls (the Preferences windows has 250!) and have not noticed this behavior, are you using very custom number for the tab order, for example negative ones?

Chris