Text2-Examples in 8.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Text2-Examples in 8.0

Maarten Mostert

Hi,

 

A few things,

 

1) The UI-Painter doe not hold the new widgets ??, however I can copy paste the examples from their canvas so this is not a show stopper.

 

2) I used the boss in and boss out examples to put the widget text in a database but got nothing. I then used the example to save the text contents to disk and read it back in. This appeared not to work and that is a problem as the API is not so easy to understand.

 

3) When using the replace functionality the wrapper changed the widgets position, see the screencast here.

https://www.dropbox.com/s/ldshmc78d237k6g/2015-03-27_22-58-39.mp4?dl=0

 

Regards,

 

@+Maarten,

 

 

 

28 Av Alphonse Denis

83400 Hyères, France

+33 676411296 

http://stakepoint.com/

 


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Text2-Examples in 8.0

Maarten Mostert

Maybe point 2 was not so clear



> [hidden email] |

Hi,

 

A few things,

 

1) The UI-Painter doe not hold the new widgets ??, however I can copy paste the examples from their canvas so this is not a show stopper.

 

2) I used the boss in and boss out examples to put the widget text in a database but got nothing. I then used the example to save the text contents to disk and read it back in. This appeared not to work and that is a problem as the API is not so easy to understand.

 

This is what I use to store the Text2 Document in a ByteArray

 

creatBinaryFromComments

| objects myByteArray |

objects := self commentDocument value asDocument.
myByteArray := #comments asByteArray.
(BinaryObjectStorage onNew: myByteArray readWriteStream)
             nextPut: (OrderedCollection with: objects);
             close.
^self addUpdateTaskComment: myByteArray selectedTask: selectedTaskRow value

 

The problem resides in the asDocument which remains empty, if I type something in the example editor

 

3) When using the replace functionality the wrapper changed the widgets position, see the screencast here.

https://www.dropbox.com/s/ldshmc78d237k6g/2015-03-27_22-58-39.mp4?dl=0

 

Regards,

 

@+Maarten,

 

 

 

28 Av Alphonse Denis

83400 Hyères, France

+33 676411296 

http://stakepoint.com/

 


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Text2-Examples in 8.0

Michael Lucas-Smith-2

On 28 Mar 2015, at 3:42 pm, [hidden email] wrote:

Maybe point 2 was not so clear
Hi,

 

A few things,

 

1) The UI-Painter doe not hold the new widgets ??, however I can copy paste the examples from their canvas so this is not a show stopper.

 


They’re the last three widgets on the widget palette: Document View, Document Editor and Input Editor.


2) I used the boss in and boss out examples to put the widget text in a database but got nothing. I then used the example to save the text contents to disk and read it back in. This appeared not to work and that is a problem as the API is not so easy to understand.

 

This is what I use to store the Text2 Document in a ByteArray

 

creatBinaryFromComments
| objects myByteArray |

objects := self commentDocument value asDocument.
myByteArray := #comments asByteArray.
(BinaryObjectStorage onNew: myByteArray readWriteStream)
             nextPut: (OrderedCollection with: objects);
             close.
^self addUpdateTaskComment: myByteArray selectedTask: selectedTaskRow value

 

The problem resides in the asDocument which remains empty, if I type something in the example editor

The value is not going to go back from the widget to your value model until you #accept it or turn on auto accept.

 

3) When using the replace functionality the wrapper changed the widgets position, see the screencast here.

 


Thanks we have AR71093 for this. You can place your editor inside a composite as a work around to make it ‘stay up’.

Regards,

 

@+Maarten,

 

 

 

28 Av Alphonse Denis
83400 Hyères, France
+33 676411296 

 

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Text2-Examples in 8.0

Michael Lucas-Smith-2

The problem resides in the asDocument which remains empty, if I type something in the example editor

The value is not going to go back from the widget to your value model until you #accept it or turn on auto accept.

I should also mention you can get the ‘live’ document from the widget and its flow, but changing either will make the widget go out of sync, most likely, so if you want to edit it, you’re best to edit it via the widgets API. In this case you’re just saving it, so it sounds like you want to #accept the editors changes back in to your value model.

Cheers,
Michael

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Text2-Examples in 8.0

Maarten Mostert-2
Thanks Michael,

I never noticed that my NextDataset widget corrupted the UI Painter tool palette.

I had been looking for an accept method but got lost in the flow thing.

Knowing where to look I’ll try again.

@+Maarten,


On 30 Mar 2015, at 00:11, Michael Lucas-Smith <[hidden email]> wrote:


The problem resides in the asDocument which remains empty, if I type something in the example editor

The value is not going to go back from the widget to your value model until you #accept it or turn on auto accept.

I should also mention you can get the ‘live’ document from the widget and its flow, but changing either will make the widget go out of sync, most likely, so if you want to edit it, you’re best to edit it via the widgets API. In this case you’re just saving it, so it sounds like you want to #accept the editors changes back in to your value model.

Cheers,
Michael
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc