>>
APLDN Home

>>
Events

>>
Trainings

>>
APL Books

>>
APLDN Links

>>
Discussion Groups

>>
Downloads

>>
Articles

>>
Library

>>
Learning Tools

>>
APLDN User IO

>>
APL2000.com




Problem Resolution

Author Thread: Captions and selectors
Robert.Jones
Captions and selectors
Posted: Monday, February 27, 2006 1:32 PM (EST)

 

I'm having a problem with captions and the selector control using the March 29,2005 version of the web component.

 

Problem 1.  Any control involving a caption seems to be ignoring the "font", "where" and probably a few other clauses.  The captions aren't positioned with the control.  It appears that in the browser environment the caption itself may be implemented as a separate control.  What's the correct way to set  up captions on controls involving them?

 

Problem 2.  I have two selector controls in my app.  One works fine, the other appears as simply a gray bar.  The only difference I can think of is that the one that isn't working contains more pages than the other.  This ring any bells with anyone?  So far, trial and error testing hasn't tracked down the issue.

 

Thanks

 

Bob


Comments:

Author Thread:
Support
Captions and selectors
Posted: Tuesday, February 28, 2006 6:47 PM (EST)

We will investigate your problems and post a response in a timely manner.

 

APL2000 Support

     

Robert.Jones
Captions and selectors
Posted: Wednesday, March 01, 2006 5:13 PM (EST)
Thanks

     

Support
Captions and selectors
Posted: Thursday, March 02, 2006 2:10 PM (EST)

This is an update to Problem 1. 

 

The reason the font property is ignored is because the font property isn't implemented in APL+WebComponent.  But it is still possible to set fonts on ŒWI objects.  You do this by specifying the font as a DHTML style property in a user defined property with the style_  prefix.  For example,

 

      'obj' ŒWI 'style_font'  '12pt Arial'

There are examples of this in the two articles, "APL+WebComponent APL Language" and "APL+WebComponent GUI", in the "APL And The Web" section of APLDN at http://apldn.apl2000.com/Articles/APL+Web+Articles/default.aspx and in Eric Lescasse's article "APL+WebComponent (Part 2)" at http://www.lescasse.com/APLWebComponent2.asp.

 

APL2000 Support

     

Robert.Jones
Captions and selectors
Posted: Friday, March 03, 2006 1:23 PM (EST)

OK.  That seems to work as long as I append "caption" to the name of the control I actually created.  Why are captions now implemented as separate controls in the browser?  Do I also have to write code to propagate the "where" value of each control I created to the corresponding "...caption" control?

 

Thanks

     

Robert.Jones
Captions and selectors
Posted: Friday, March 03, 2006 3:24 PM (EST)
Further info on the selector problem.  It's not the number of pages causing the problem.  It looks funny because none of the pages below it are creating.  So it winds up being a selector with no tabs and no extent.  Can selectors be created within pages?  This selector is the child of a frame of a page of selector.  Is that supported?

     

Support
Captions and selectors
Posted: Friday, March 03, 2006 4:16 PM (EST)

> OK.  That seems to work as long as I append "caption" to the name of the conntrol I actually created. 

> Why are captions now implemented as separate controls in the browser?

 

That isn't the case here.  The caption works the same when it's on the creation line and as a separate statement.  If you're having this problem in your application, you should retry with another simpler example.

 

APL2000 Support

 

 

     

Robert.Jones
Captions and selectors
Posted: Friday, March 03, 2006 4:54 PM (EST)

I'm not referring to the placement of the "caption" property.
The example is pretty simple.  It's below. 

 

 

'A' Œwi 'Delete'
0 0½'A'   Œwi 'Create' 'Form' ('caption' 'Data Query Tool') ( 'where' 0 0 42 125) 'Hide' ( 'scale' 5)
0 0½'A.A' ŒWI 'Create' 'Check' ( 'caption' 'This is check box A.A') ( 'scale' 5) ('where' 15 10 21 600)
0 0½'A.B' ŒWI 'Create' 'Check' ( 'caption' 'This is check box A.B') ( 'scale' 5) ('where' 600 300 21 600)
0 0½'A.C' ŒWI 'Create' 'Edit'  ('where' 50 300 200 600) ('style' 4)
c„œ'A' Œwi 'children'
c„,c,Œtcnl

'A.C' ŒWI 'text' c
0 0½'A' Œwi 'Show'

When I run this in the APL environment I get an edit box and two check boxes which have their captions properly positioned next to each other.  What I see in the edit box is the names of the three controls I created as I would expect.  When I publish this to the browser the captions on the check boxes are not next to the check box, they are near the top of the form, as if they had a default where property.  And, in the edit box I see more controls.  There are the A.A, A.B and A.C that I explicitly created, but there are also A.Acaption and A.Bcaption.  And to set the font or position on the caption I have to reference those controls names rather than the controls I actually created.

     

Robert.Jones
Captions and selectors
Posted: Friday, March 03, 2006 4:59 PM (EST)

BTW here's an example that actually references the "caption" controls.  This only works in the browser of course.  Won't work in the APL environment.

 

 

 

'A' Œwi 'Delete'
0 0½'A'   Œwi 'Create' 'Form' ('caption' 'Data Query Tool') ( 'where' 0 0 42 125) 'Hide' ( 'scale' 5)
0 0½'A.A' ŒWI 'Create' 'Check' ( 'caption' 'This is check box A.A') ( 'scale' 5) ('where' 15 10 21 600)
    'A.Acaption' Œwi '‘style_font' '40pt Arial'
    'A.Acaption' Œwi 'where' 15 10 21 600
0 0½'A.B' ŒWI 'Create' 'Check' ( 'caption' 'This is check box A.B') ( 'scale' 5) ('where' 600 300 21 600)
    'A.Bcaption' Œwi '‘style_font' '40pt Arial'
    'A.Bcaption' Œwi 'where' 600 300 21 600
0 0½'A.C' ŒWI 'Create' 'Edit'  ('where' 50 300 200 600) ('style' 4)
c„œ'A' Œwi 'children'
c„,c,Œtcnl

'A.C' ŒWI 'text' c
0 0½'A' Œwi 'Show'

     

Support
Captions and selectors
Posted: Friday, March 03, 2006 5:40 PM (EST)

Just one of the two behaviors you reported with your first example was reproduced here.  The behavior that wasn't reproduced was the one with the captions not appearing next to the combo boxes.  They appear just fine in our browser (IE 6.0.2900.2180; SP2).  The second behavior is still being investigated.

APL2000 Support

     

Robert.Jones
Captions and selectors
Posted: Monday, March 06, 2006 9:19 AM (EST)

Thanks.

 

I'm using the same browser.  Perhaps my installation of web publishing is bad. I'll try a clean install.

 

Bob

     

Robert.Jones
Captions and selectors
Posted: Monday, March 06, 2006 9:19 AM (EST)

Thanks.

 

I'm using the same browser.  Perhaps my installation of web publishing is bad. I'll try a clean install.

 

Bob

     

Support
Captions and selectors
Posted: Wednesday, March 08, 2006 4:42 PM (EST)

APL2000 wrote:

 

> Just one of the two behaviors you reported with your first example was
> reproduced here.  The behavior that wasn't reproduced was the one with
> the captions not appearing next to the combo boxes.  They appear just
> fine in our browser (IE 6.0.2900.2180; SP2).  The second behavior is
> still being investigate

 

The reason the additional controls appear in the Edit Box is that in HTML or DHTML, the Check Box doesn't have a 'caption' property.  Because of this, when the 'caption' is not supported, the APL+WebComponent creates a control to hold and show the label.  Those are the controls that are being reported when you query the 'children' property.  The same also applies to other controls.

 

APL2000 Support

     

Robert.Jones
Captions and selectors
Posted: Tuesday, March 14, 2006 3:03 PM (EST)

Follow up:  A clean re-install of 1.1.1830 didn't change anything, but backing out to either 1.1.1803 or 1.1.1760 got the captions back in their proper places.

 

I couldn't get selectors within pages to work in any version.  Should the example below be publishable?  It's a form, with a selector defined on the form with three pages.  Each page then contains a selector, each with 3 pages. Each page containing a single lable.  Works in APL, when published the sub selectors appear as gray lines, apparently because none of their subpages created.

 

   ’ TEST
[1]
[2]   0 0½'fmTEST' Œwi 'Delete'
[3]   0 0½'fmTEST' Œwi 'Create' 'Form' ( 'caption' 'Test page within page') ( 'where' 0 0 42 125) 'Hide' ( 'scale' 5) ('wher
      e' 0 0 42 125)
[4]   0 0½'fmTEST.sTop' Œwi 'Create' 'Selector' ( 'scale' 5) ('where' 15 10 667 1005)
[5]
[6]   0 0½'fmTEST.sTop.pgOne' Œwi 'Create' 'Page' ( 'caption' 'Outer Page 1') ( 'scale' 5)
[7]     0 0½'fmTEST.sTop.pgOne.sOne'   Œwi 'Create' 'Selector' ( 'scale' 5) ('where' 15 10 400 800)
[8]       0 0½'fmTEST.sTop.pgOne.sOne.pg1'    Œwi 'Create' 'Page' ( 'caption' 'Inner Page 1/1') ( 'scale' 5)
[9]       0 0½'fmTEST.sTop.pgOne.sOne.pg1.lb' Œwi 'Create' 'Label' ('caption' 'Inner Page 1/1') ( 'scale' 5)
[10]      0 0½'fmTEST.sTop.pgOne.sOne.pg2'    Œwi 'Create' 'Page' ( 'caption' 'Inner Page 1/2') ( 'scale' 5)
[11]      0 0½'fmTEST.sTop.pgOne.sOne.pg2.lb' Œwi 'Create' 'Label' ('caption' 'Inner Page 1/2') ( 'scale' 5)
[12]      0 0½'fmTEST.sTop.pgOne.sOne.pg3'    Œwi 'Create' 'Page' ( 'caption' 'Inner Page 1/3') ( 'scale' 5)
[13]      0 0½'fmTEST.sTop.pgOne.sOne.pg3.lb' Œwi 'Create' 'Label' ('caption' 'Inner Page 1/3') ( 'scale' 5)
[14]
[15]  0 0½'fmTEST.sTop.pgTwo' Œwi 'Create' 'Page' ( 'caption' 'Outer Page 2') ( 'scale' 5)
[16]    0 0½'fmTEST.sTop.pgTwo.sTwo'   Œwi 'Create' 'Selector' ( 'scale' 5) ('where' 15 10 400 800)
[17]      0 0½'fmTEST.sTop.pgTwo.sTwo.pg1'    Œwi 'Create' 'Page' ( 'caption' 'Inner Page 2/1') ( 'scale' 5)
[18]      0 0½'fmTEST.sTop.pgTwo.sTwo.pg1.lb' Œwi 'Create' 'Label' ('caption' 'Inner Page 2/1') ( 'scale' 5)
[19]      0 0½'fmTEST.sTop.pgTwo.sTwo.pg2'    Œwi 'Create' 'Page' ( 'caption' 'Inner Page 2/2') ( 'scale' 5)
[20]      0 0½'fmTEST.sTop.pgTwo.sTwo.pg2.lb' Œwi 'Create' 'Label' ('caption' 'Inner Page 2/2') ( 'scale' 5)
[21]      0 0½'fmTEST.sTop.pgTwo.sTwo.pg3'    Œwi 'Create' 'Page' ( 'caption' 'Inner Page 2/3') ( 'scale' 5)
[22]      0 0½'fmTEST.sTop.pgTwo.sTwo.pg3.lb' Œwi 'Create' 'Label' ('caption' 'Inner Page 2/3') ( 'scale' 5)
[23]
[24]  0 0½'fmTEST.sTop.pgThree' Œwi 'Create' 'Page' ( 'caption' 'Outer Page 3') ( 'scale' 5)
[25]    0 0½'fmTEST.sTop.pgThree.sThree' Œwi 'Create' 'Selector' ( 'scale' 5) ('where' 15 10 400 800)
[26]      0 0½'fmTEST.sTop.pgThree.sThree.pg1'    Œwi 'Create' 'Page' ( 'caption' 'Inner Page 3/1') ( 'scale' 5)
[27]      0 0½'fmTEST.sTop.pgThree.sThree.pg1.lb' Œwi 'Create' 'Label' ('caption' 'Inner Page 3/1') ( 'scale' 5)
[28]      0 0½'fmTEST.sTop.pgThree.sThree.pg2'    Œwi 'Create' 'Page' ( 'caption' 'Inner Page 3/2') ( 'scale' 5)
[29]      0 0½'fmTEST.sTop.pgThree.sThree.pg2.lb' Œwi 'Create' 'Label' ('caption' 'Inner Page 3/2') ( 'scale' 5)
[30]      0 0½'fmTEST.sTop.pgThree.sThree.pg3'    Œwi 'Create' 'Page' ( 'caption' 'Inner Page 3/3') ( 'scale' 5)
[31]      0 0½'fmTEST.sTop.pgThree.sThree.pg3.lb' Œwi 'Create' 'Label' ('caption' 'Inner Page 3/3') ( 'scale' 5)
[32]
[33]  0 0½'fmTEST' Œwi 'Show'
    ’

 

     



APL2000 Official Web Site

I don't pretend to understand the Universe - it's a great deal bigger than I am.
-- Thomas Carlyle

APLDN Home   |    |  Events   |  Trainings   |  APL Books   |  APLDN Links   |    |  Discussion Groups   |    |  Downloads   |  Articles   |  Library   |  Learning Tools   |  APLDN User IO   |  APL2000.com   |