This Question is Assumed Answered

1 "correct" answer available (5 pts) 15 "helpful" answers available (3 pts)
6 Replies Last post: Jun 9, 2008 10:14 AM by RMH

VLE with style sheets

Jun 5, 2008 8:51 PM

Click to view fukuta's profile Level 6 fukuta 85 posts since
Oct 17, 2007
Hi everyone,

I'm leveraging STYLED-CONTROLS to make my applet screens. Recently, I found the Style Sheets settings in IDE's project properties so that I set the settings for VLE to render layouts using my style sheet.
Though, rendering of some controls doesn't use my style sheet sometimes. This problem seems occurring only on my subclassed controls. Sorry I don't know exactly where the problem is, my style sheet, controls I defined, the settings or other. But, please tel me if there are known issues like above.
Click to view carl's profile Curl carl 62 posts since
Oct 17, 2007
1. Re: VLE with style sheets Jun 6, 2008 12:47 AM
Is the problem showing up in the VLE or when running your applet?

Are you getting a different style for those controls or no decorations at all?

How are you specifying your custom ui-objects for your Controls?
Click to view fukuta's profile Level 6 fukuta 85 posts since
Oct 17, 2007
2. Re: VLE with style sheets Jun 6, 2008 1:04 AM
in response to: carl
It shows up only in the VLE. Running applet is rendered as I expected.
In the VLE, there are some controls that are not decorated at all. That's not to say that they get a different style.
And my applet isn't using any custom ui-objects, just using subclassed controls.
Click to view fukuta's profile Level 6 fukuta 85 posts since
Oct 17, 2007
3. Re: VLE with style sheets Jun 6, 2008 4:32 AM
in response to: fukuta
For the problem confirmation, I used subclassed controls below, MyCommandButton and MyTextField, having no functional extension.


{define-class public MyCommandButton {inherits CommandButton}
  {constructor public {default
                          label:#Label = "MyCommandButton",
                          reactive-label:#ReactiveLabel = null,
                          style:CommandButtonStyle = CommandButtonStyle.standard,
                          text-breakable?:bool = false,
                          ui-object:#CommandButtonUI = null,
                          ...
                      }
    {construct-super
        label = label,
        reactive-label = reactive-label,
        style = style,
        text-breakable? = text-breakable?,
        ui-object = ui-object,
        ...
    }
  }
}

{define-class public MyTextField {inherits TextField}
  {constructor public {default ...}
    {construct-super {splice ...}}
  }
}

And I use a DEFAULT-STYLE-SHEET that comes with style libraries. I use it as is, with no modifications. (I said I used my own style sheet, but I found the problem also shows up when I use the default.)
This is the layout code created by VLE. There are my controls and normal controls.


{define-layout-class public MyContainer
    || Begin meta-data DO NOT EDIT
    format-version = 2,
    design-time-class = "Canvas",
    run-time-class = "Canvas",
    || End meta-data
    width = 315pt,
    height = 250pt,
    background = "#D4D0C8",
    border-width = 1.5pt,
    border-color = "#D4D0C8",
    border-style = "raised",
    font-size = 8pt,
    control-appearance-changeable? = true,

    {layout-element void:MyCommandButton
        || Begin meta-data DO NOT EDIT
        anchor = "top-left",
        x = 45px,
        y = 35px,
        || End meta-data
        {MyCommandButton
        }
    }

    {layout-container void:CommandButton
        || Begin meta-data DO NOT EDIT
        anchor = "top-left",
        x = 180px,
        y = 35px,
        || End meta-data
        {CommandButton
            label = "command-button-1"
        }
    }

    {layout-element void:MyTextField
        || Begin meta-data DO NOT EDIT
        anchor = "top-left",
        x = 45px,
        y = 80px,
        || End meta-data
        {MyTextField
        }
    }

    {layout-element void:TextField
        || Begin meta-data DO NOT EDIT
        anchor = "top-left",
        x = 215px,
        y = 80px,
        || End meta-data
        {TextField
        }
    }

    {constructor public {default}
        {self.initialize-components}
    }
}

MyTextField and MyCommandButton are styled properly after I put them on VLE. But once I close VLE and re-open the layout, my controls lose their styles while normal CommandButton and TextField still have its style.
Please let me know if other lack of information.

Click to view rhh's profile Curl rhh 29 posts since
Oct 12, 2007
4. Re: VLE with style sheets Jun 6, 2008 5:52 AM
in response to: fukuta
I think it would be best if you submitted a bug report, attaching a zip file containing your complete test project that shows this problem, and also including the VLE extension that you used to teach the VLE about MyCommandButton and MyTextField. Then we can try to reproduce the problem here and understand what is going wrong.

-Bert
Click to view fukuta's profile Level 6 fukuta 85 posts since
Oct 17, 2007
5. Re: VLE with style sheets Jun 8, 2008 9:20 PM
in response to: rhh
I've sent to Curl Support about this problem attaching the project I tried.
Thanks.
Click to view RMH's profile Curl RMH 45 posts since
Feb 17, 2008
6. Re: VLE with style sheets Jun 9, 2008 10:14 AM
A bug report was filed for this issue.