INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: NEW:Expression editor shows large, multiline text area. (instead of single line)  (Read 3529 times)

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9133

This new tool has a lot of potential. Really.

They way that it's accessed at the moment gives the impression that it's sole purpose is for writing expression based view scheme panes, and I suppose, for now, it is.
Please consider the following:
Expressions can be used in...
  • the 'add library field' dialogue (aka Calculated Data)
  • the Player bar display area
  • thumbnail text area of every viewscheme
  • the rename from properties tool
  • the create/edit viewscheme dialogue
  • the 'send to... > External' parameters field
  • Did I miss any others?
If there was a Save button that allowed us to add our own expressions to the 'Load' list, and also 'Load' list management, so we can delete expired expressions, This could become our personal expression store.
If it could be instigated from any area of the program that accepted expressions, and behave in the same fashion as it does currently for panes, all the better, but how about a simple(?) save button to begin with?
Then, if we wanted any oft used expression for, say, a library field, we could just load up the editor, load the expression, copy to clipboard, close editor, paste in destination.
Naturally, the saved expressions would be included in the library backups too!

waddaya reckon? are my days of maintaining that mc expressions file in my docs folder almost over?

-marko.

quick ps. I can't start an 'expressions' thread without re-iterating the call for expressions to be allowed in the base path field of the rename from properties dialogue:)
if(isequal([media type],video,1),Z:,if(isequal([media type],image,1),E:,if(isequal([media type],audio,1),D:,C:)))

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...

A way to save expressions similar to the the way column (or sorting) presets can be saved in the edit view scheme dialog.

Count me in.
Logged

darichman

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362

Definitely count me in!
Logged

Jaguu

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1336

marko,

you forgot the caption field in image playback options!
This would be a great winner allowing to have multiline caption information. The current one line caption field during slide shows is a bit limiting! They could add there extra functions to format such a caption field like other fonts, font sizes, colors, background such as transparent etc.

Something like:
caption_image_playback {
expression arts-capinfo {
   screen-position: top-left  (or top-right, top-center, bottom-left, bottom-right, bottom-center, center) 
   caption-font: garamond
   caption-color: gold
   caption-background: transparent
   "Artist:  [artist]\n"     (caption-size=12);
   "Title:    [name]\n"    (caption-size=14);
   "Style:   [style]\n"     (caption-size=10);
   "Year:    [year]\n"     (caption-size=10);
   "Period: [period]\n"  (caption-size=10);
   "Gallery: [gallery]\n" (caption-size=10);
   }
expression nature-capinfo {
...
}

expression family-capinfo {
...
}

If genre=family then use family-capinfo
if genre=nature then use nature-capinfo
if genre=arts then use arts-capinfo
else use [name] - [comment]
}

For formatting some css like semantics could be used!

By the way, this is something I suggested a while ago. I even went further suggesting something similar to "names" in Excel. You would give to any expression a particular name such as "capinfo" for the image playback field. Then you just enter the expression name and not the whole expression in the appropriate fields. The expression editor could display all the named expressions all at once, and you would all the time get an overview of all expressions used in a current instance of MC. A save/Export button would easily allow to transfer expressions to other PC's. Right now we have to enter expressions again and again on new or rebuilt pc's.
You wouldn't need to have the expression editor built-in in every field, just have one central expression editor and all expressions referenced by names! This would be the absolute flexibility!

Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9133

Actually, "One expression editor to rule them all" was exactly where I was coming from when I mentioned
Quote
If it could be instigated from any area of the program that accepted expressions, and behave in the same fashion as it does currently for panes, all the better, but how about a simple(?) save button to begin with?
ie. we should be able to summon it from any place we can use expressions.

And how could I have omitted the image playback caption? Silly me. Currently, my slideshow caption looks like so:
Quote
Slideshow caption (with vada's age)
=============================
if(isempty([caption]),if(isempty([events]),if(isempty([places]),[subject],[places]),[events]),[caption]) (if(isequal([people],vada,8),if(isequal([date],07//04//2004,8),Vada's birthday,if(isequal([date],07//04//2005,8),Vada's 1st birthday,if(isequal([date],07//04//2006,8),Vada's 2nd birthday,if(isequal([date],07//04//2007,8),Vada's 3rd birthday,if(isequal([date],07//04//2008,8),Vada's 4th birthday,if(isequal([date],07//04//2009,8),Vada's 5th birthday,if(isequal([date],08//04//2004,8),Vada/, aged 1 day,if(isequal([date],09//04//2004,8),Vada/, aged 2 days,if(isequal([date],10//04//2004,8),Vada/, aged 3 days,if(isequal([date],11//04//2004,8),Vada/, aged 4 days,if(isequal([date],12//04//2004,8),Vada/, aged 5 days,if(isequal([date],13//04//2004,8),Vada/, aged 6 days,if(isequal([numbers],040420,4),Vada/, aged 1 week,if(isequal([numbers],040427,4),Vada/, aged 2 weeks,if(isequal([numbers],040504,4),Vada/, aged 3 weeks,if(isequal([numbers],040511,4),Vada/, aged 4 weeks,if(isequal([numbers],040518,4),Vada/, aged 5 weeks,if(isequal([numbers],040525,4),Vada/, aged 6 weeks,if(isequal([numbers],040601,4),Vada/, aged 7 weeks,if(isequal([numbers],040608,4),Vada/, aged 8 weeks,if(isequal([numbers],040706,4),Vada/, aged 2 months,if(isequal([numbers],040806,4),Vada/, aged 3 months,if(isequal([numbers],040906,4),Vada/, aged 4 months,if(isequal([numbers],041006,4),Vada/, aged 5 months,if(isequal([numbers],041106,4),Vada/, aged 6 months,if(isequal([numbers],041206,4),Vada/, aged 7 months,if(isequal([numbers],050106,4),Vada/, aged 8 months,if(isequal([numbers],050206,4),Vada/, aged 9 months,if(isequal([numbers],050306,4),Vada/, aged 10 months,if(isequal([numbers],050406,4),Vada/, aged 11 months,if(isequal([numbers],050506,4),Vada/, aged 1 year,if(isequal([numbers],050606,4),Vada/, aged 13 months,if(isequal([numbers],050706,4),Vada/, aged 14 months,if(isequal([numbers],050806,4),Vada/, aged 15 months,if(isequal([numbers],050906,4),Vada/, aged 16 months,if(isequal([numbers],051006,4),Vada/, aged 17 months,if(isequal([numbers],051106,4),Vada/, aged 18 months,if(isequal([numbers],051206,4),Vada/, aged 19 months,if(isequal([numbers],060106,4),Vada/, aged 20 months,if(isequal([numbers],060206,4),Vada/, aged 21 months,if(isequal([numbers],060306,4),Vada/, aged 22 months,if(isequal([numbers],060406,4),Vada/, aged 23 months,if(isequal([numbers],070406,4),Vada/, aged 2 years,if(isequal([numbers],080406,4),Vada/, aged 3 years,if(isequal([numbers],090406,4),Vada/, aged 4 years,if(isequal([numbers],100406,4),Vada/, aged 5 years,FIX THE CAPTION))))))))))))))))))))))))))))))))))))))))))))))/) formatdate([date,0],dd MMMM yyyy),formatdate([date,0],dd MMMM yyyy)/)
=============================

I've got a lot of these saved in txt files, when really, MC should be taking care of them for me, or at least, giving me the tools to keep everything 'in-house'.

I'm right with you regarding formatting of the slideshow caption, that would be pretty neat too, but, let's see if we can't get some basic expression management in place to begin with first.

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...

Don't forget to include also a way to add comments to the editor

ie
 //this is a comment
expr 1.....

(( this is a comment )) (alternatively, does not matter what char(s) is used)
expr 2

...etc

will make those expressions programs a lot easier on the eye.
Logged

gpvillamil

  • Citizen of the Universe
  • *****
  • Posts: 829
  • Listen to the music...

Where is exactly is this multi-line editor? Does it turn up when editing smartlists?
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9133

the only place we see it, at the moment, is when editing view schemes. The quickest way to it is to click on a pane header, and then on "Set to advanced expression"

//comments! good thinking hit_ny :)

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...

Quote
Slideshow caption (with vada's age)
=============================
if(isempty([caption]),if(isempty([events]),if(isempty([places]),[subject],[places]),[events]),[caption]) (if(isequal([people],vada,8),if(isequal([date],07//04//2004,8),Vada's birthday,if(isequal([date],07//04//2005,8),Vada's 1st birthday,if(isequal([date],07//04//2006,8),Vada's 2nd birthday,if(isequal([date],07//04//2007,8),Vada's 3rd birthday,if(isequal([date],07//04//2008,8),Vada's 4th birthday,if(isequal([date],07//04//2009,8),Vada's 5th birthday,if(isequal([date],08//04//2004,8),Vada/, aged 1 day,if(isequal([date],09//04//2004,8),Vada/, aged 2 days,if(isequal([date],10//04//2004,8),Vada/, aged 3 days,if(isequal([date],11//04//2004,8),Vada/, aged 4 days,if(isequal([date],12//04//2004,8),Vada/, aged 5 days,if(isequal([date],13//04//2004,8),Vada/, aged 6 days,if(isequal([numbers],040420,4),Vada/, aged 1 week,if(isequal([numbers],040427,4),Vada/, aged 2 weeks,if(isequal([numbers],040504,4),Vada/, aged 3 weeks,if(isequal([numbers],040511,4),Vada/, aged 4 weeks,if(isequal([numbers],040518,4),Vada/, aged 5 weeks,if(isequal([numbers],040525,4),Vada/, aged 6 weeks,if(isequal([numbers],040601,4),Vada/, aged 7 weeks,if(isequal([numbers],040608,4),Vada/, aged 8 weeks,if(isequal([numbers],040706,4),Vada/, aged 2 months,if(isequal([numbers],040806,4),Vada/, aged 3 months,if(isequal([numbers],040906,4),Vada/, aged 4 months,if(isequal([numbers],041006,4),Vada/, aged 5 months,if(isequal([numbers],041106,4),Vada/, aged 6 months,if(isequal([numbers],041206,4),Vada/, aged 7 months,if(isequal([numbers],050106,4),Vada/, aged 8 months,if(isequal([numbers],050206,4),Vada/, aged 9 months,if(isequal([numbers],050306,4),Vada/, aged 10 months,if(isequal([numbers],050406,4),Vada/, aged 11 months,if(isequal([numbers],050506,4),Vada/, aged 1 year,if(isequal([numbers],050606,4),Vada/, aged 13 months,if(isequal([numbers],050706,4),Vada/, aged 14 months,if(isequal([numbers],050806,4),Vada/, aged 15 months,if(isequal([numbers],050906,4),Vada/, aged 16 months,if(isequal([numbers],051006,4),Vada/, aged 17 months,if(isequal([numbers],051106,4),Vada/, aged 18 months,if(isequal([numbers],051206,4),Vada/, aged 19 months,if(isequal([numbers],060106,4),Vada/, aged 20 months,if(isequal([numbers],060206,4),Vada/, aged 21 months,if(isequal([numbers],060306,4),Vada/, aged 22 months,if(isequal([numbers],060406,4),Vada/, aged 23 months,if(isequal([numbers],070406,4),Vada/, aged 2 years,if(isequal([numbers],080406,4),Vada/, aged 3 years,if(isequal([numbers],090406,4),Vada/, aged 4 years,if(isequal([numbers],100406,4),Vada/, aged 5 years,FIX THE CAPTION))))))))))))))))))))))))))))))))))))))))))))))/) formatdate([date,0],dd MMMM yyyy),formatdate([date,0],dd MMMM yyyy)/)

There's a nice expression, filled with nested if(..if(.. etc

How do you ensure the closing parentheses add up correctly ?
Logged

johnnyboy

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 626

Just found this... had been wondering where it was.
Thanks for the heads up.

I really think this needs to be developed further.

I know expressions exist, but there's no way I could use them without a LOT of reading around this site and digging into them.

The GUI should enable me to do everything I want to do with them without having to research how to do it first.
Logged

zirum

  • Galactic Citizen
  • ****
  • Posts: 403
  • still learning.

Hi,

I just rememberd this post for making it possible to store expression. I indeed support this idea (if it's not interperented yet). Just caught myself wanting such a feature.

So i guess this makes it a bump, and count me in for this!

Maybe afterwards, the possibility to inject variables into expression would also come in handy. like [Expression name]([Artist]). That would be soo cool...:)

Btw: Nice expression, hit_ny:)
Logged
Note to myself: Read, think, write - Read, think, write - think, read, write - think, write, read - think, write, read... Aahhw, i always mess that up...
Pages: [1]   Go Up