Cool. I think I'll try to implement something that's very simple as well. -- Raymond Irving
--- Michael Bystrom <[EMAIL PROTECTED]> wrote: > I have a theme system that I like allot in the IOS > library, it uses a > > dynapi.theme = {} > > object as the main theme holder, then for each new > theme that is loaded it > get it's own namespace > > dynapi.theme.button = {} > > The first time the button is called it creates the > theme and then for each > new call it just returns the theme and builds the > button. I tried allot of > different versions of this but found that this was > the best way, the main > theme is hard coded inside the button script, > Button.getTheme() as Raymond > said "how many times will a web app allow the user > to change the theme on > the fly?" > > I you want another theme > > var theme = dynapi.theme.widget = {} > theme.color="red" > etc.. > > new Button("hello",10,10,100,20, theme ) > > I've found it fairly simple to keep track of > inheritance to other widget > themes even when you include many other themes > inside a new theme > > > > As for a style manager I'm working on a CSS like > system. If a person starts > to use DynAPI I'm sure that he/she has done some CSS > scripting and > understand that. > > Consider this: > > CSS: > #layer { > font: 11px Tahoma,Verdana,Arial; > color: white; > font-weight: bold; > text-align: left; > padding: 2px; > border: 1px solid rgb(100,100,100); > } > > DynAPI: > layer.setStyle({ > font: "11px Tahoma,Verdana,Arial", > color: "white", > fontweight: "bold", > textalign: "left", > padding: "2px", > border: "1px solid rgb(100,100,100)" > }) > > then the setStyle() parse the input and Voila > > IOS library will have SOMETHING like this, I've just > made some simple tests > with the new api. > > setStyle() would need to be rendered with the layers > though, not when onload > > > Man I'm still sick after Bulgaria man that food was > .... my stomach is not > happy :P > > Michael > > > > > Den 03-10-03 06.25, skrev "Raymond Irving" > <[EMAIL PROTECTED]>: > > > > > The StyleManager component are more complex than > > traditional widgets. It will take alonger time to > > create a StyleManager component than it would an > > ordinary widget. > > > > The beauty about the StyleManager is that it give > the > > user the flexibility to change the behavoir of the > > component without having to change the base > component > > itself. > > > > In the intrest of time and for the benefit of the > > project I would have to then suggest that > StyleManager > > components be added at a later date. These will > > require a lot of testing as they things can get > sticky > > when it comes on to inheritance. > > > > I also wanted to create widgets that are themeable > but > > how often will a web app require the user to > change > > the it's theme? Not very often I guess. And even > if we > > where to stick a redraw() into the widgets how > many > > times will a web app allow the user to change the > > theme on the fly? > > > > It's all good and well to have such nice features > as > > on the fly skinning and theme changing but these > often > > time carries some overhead and inheritance > problems. > > > > I'll remove the StyleManager and it's components > and > > replace them with traditional design. The Button > > compoenent will be broken up into three widgets - > > Button, FlatButton and ImageButton, etc. > > > > > > > > -- > > Raymond Irving > > > > > > --- Kevin <[EMAIL PROTECTED]> wrote: > >> Hi, > >> > >> I agree with Daniel. I just don't understand it. > A > >> very nice > >> project but who is going to use the StyleManager > >> implementation > >> without full documentation of how the internals > >> work. I printed > >> off nearly 10 files from one top level example > and > >> then gave up. > >> > >> These completed StyleManger components can be > >> reproduced by > >> a user using default style on their own site. So > >> they are a very good > >> addition to the gui but it would take an expert > in > >> dynapi and javascript > >> to design widgets in this way. I'll wait for the > >> docs then decide if it's > >> easier than the traditional method. > >> > >> - > >> Kevin > >> > >> > >> "Daniel Tiru" <[EMAIL PROTECTED]> wrote: > >> > >>> Hi Raymond! > >>> > >>> I still actually dont get the style manager > >> completly... > >>> > >>> I have found styles in the gui catalog, but > >> forgive me if i am a bit > >>> slow. But i dont really get it :( > >>> > >>> Say i have the viewpane and by default it uses a > >> style like > >>> viewpane.style (or am i already out of the > area)? > >>> How do i change the style for that one without > >> modifying the source of > >>> the viewpane.style? Do I have to make a copy of > >> it, edit it and add it > >>> to packages.js? > >>> > >>> Or is there some other way? Cause i think dynAPI > >> will always be updated, > >>> meaning you always have to get a new packages > >> file, witch will overwrite > >>> your personal entry. I think i have seen or > >> atleast think i have seen, > >>> that you dont need to add stuff to packages but > >> can do that in your code > >>> on your page? Is it this way we should do it? > >>> > >>> Sorry for beeing a bit slow, but its so mutch to > >> keep track on. > === message truncated === __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://www.mail-archive.com/[EMAIL PROTECTED]/