Notifications
Clear all

[Closed] CA edittext in 2013 does not hold strings

does anybody know of any workaround?
Thanks in advance.

7 Replies
1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

is it only 2013 issue? does it work right in 2012?

Yes, better in 2012.

 PEN

What do you mean by better? Can you show a piece of code that is not doing what you think it should be?

Have you linked the ui component to the parameter block? And defined the rollout in the pblock definition?

This used to work fine in 2012 but does not in 2013.
It might depend on something else in the code since doing this with the Parameter Editor works as expected.
Thanks in advance.

rollout CAA "CAeditText_2013" width:232 height:96
(
	button btn1 "Assign" pos:[72,40] width:88 height:24
	
	global CA = attributes Data
	(
		parameters main rollout:params
		(
			data1 type:#string ui:ui_text
		)
		rollout params "BIM Parameters" width:162 height:93
		(
			editText ui_text "type in: " width:140 height:16 labelOnTop:on
		)
	)

	on btn1 pressed do
	(
		selectLayer = LayerManager.getLayerFromName "0" 
		selectLayer.nodes &sel0 -- selects all nodes in layer and defines the array "sel0" containing selected nodes
		n = sel0.count
		for i = 1 to n do
		(
			custAttributes.add sel0[i] CA
		)
		messagebox "done, does it work?" title: "CA Message" beep:true
	)
)
createDialog CAA

As I posted to your AREA thread, the issue is caused by the height of the edittext. Make it 17 or 18 and it works just fine.

-Eric

Thanks Eric.