Re: Screen structure reference for filepicker-ed images [message #1376 is a reply to message #1375] |
Fri, 20 June 2008 05:35 |
AJM
Messages: 2363 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
Here are some answers:
(a) If a field is defined with a long length, say 80 characters, but when it is displayed on the screen you want the textbox to be shorter, say 40 characters, you have to modify your screen structure file to provide a size override, as in:
$structure['main']['fields'][] = array('picture' => 'Picture', 'size' => 40);
This is documented in http://www.tonymarston.net/php-mysql/model-view-controller.h tml#xsl-structure-detail.
(b) By default a field which has 'subtype' => 'image' and 'control' => 'filepicker' will display both the image and the text, but the text can be omitted by amending the $fieldspec values within your _cm_changeConfig() method:
$this->fieldspec['picture']['notext'] = 'y';
This is documented in http://www.tonymarston.net/php-mysql/data-dictionary.html#$f ieldspec in the 'subtype' section.
(c) If you run a task, then change some code or screen structure settings, it may not be enough just to hit the 'refresh' button in your browser - you may have to exit the task and restart it so that it can redo its initialisation procedure. This procedure is only performed when the task is first initialised and omitted on subsequent iterations (until the task is terminated).
(d) By default the session data on each task is dropped when the task terminates so that the initialisation procedure can be performed when the task is next activated, but this behaviour can be overridden by setting 'Keep data on exit' to YES on the task's details in the MENU database. This will allow you to leave the task, but when you return to it it will resume from where it left off instead of starting from scratch. If this setting is YES there are two ways to force the task to be re-initialised:
- log off and on again
- go to the Home page, press the 'Session Data' button, select 'Drop Saved Pages' and hit 'submit'.
I hope this helps.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|