XIDE 1.1.5

This forum is meant for questions and discussions about the X# language and tools
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am

XIDE 1.1.5

Post 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
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

XIDE 1.1.5

Post 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
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
FFF
Posts: 1522
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

XIDE 1.1.5

Post 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
Regards
Karl
(on Win8.1/64, Xide32 2.19, X#2.19.0.2.)
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am

XIDE 1.1.5

Post 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
User avatar
lumberjack
Posts: 723
Joined: Fri Sep 25, 2015 3:11 pm

XIDE 1.1.5

Post 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,
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

XIDE 1.1.5

Post 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
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
User avatar
wriedmann
Posts: 3644
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

XIDE 1.1.5

Post 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
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am

XIDE 1.1.5

Post 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
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am

XIDE 1.1.5

Post 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
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

XIDE 1.1.5

Post 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
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
Post Reply