FMP to Servoy Tutorial commentary

Please feel free to move this to some better location. I’m working my way through Bob Cusick’s FMP to Servoy Tutorial. Bob supplies you with an FMP file and a 146-page PDF of instructions on how to reproduce effectively the same solution but in Servoy.

This strikes me as an eminently sensible place to start to get one’s hands on these tools, get a feel for them, start to build some experience with working with Servoy before moving on to the “real thing”.

I have mixed feelings about this tutorial. It’s really excellent and Bob’s obviously put a lot of thought and time on it. However, I’ve found one bug in Servoy (Mac only apparently) in doing it. I’ve discovered there’s a few differences between what Bob says in the surrounding text and what’s in the screenshots (my recommendation, go for the screenshots), and one of the files he says to import isn’t there, replaced by another which behaves slightly differently.

But hey, I’ve made mistakes along the way (like not paying close attention to fine details such as Bob’s names for tables and fields. FMP is VERY forgiving and Servoy is not nearly so. As a result I’ve increased my time working through this tutorial due to both my own goofiness and oddities in Bob’s text.

Having said this, I plan to continue my discussion of working through this tutorial here where perhaps others can chime in and clarify my confusions, not leave that just to Bob.

The bug has already been posted here. On the Mac, go to the Media dialogue and click on Import Directory. The subsequent dialogues are completely different than Bob’s PC screenshots and in the end this function is non-functional. The work around is to import your graphics one at a time. No big deal, just the long way round the rectangle.

Remember, I’m reading the PDF on screen, switching to Servoy, doing the step, back to the PDF, and so forth. I’ve NOT read ahead. Therefore I sometimes get ahead of Bob and run for a moment off the rails.

First Bob walks you through creating a new empty SQL database. Sybase went and changed their website AFTER Bob published the version of the PDF I have. Therefore I downloaded the wrong file and became very confused. But on the plus side, Bob walks you through a very lengthy series of required steps (once you’ve downloaded the correct software) and although it’s lengthy it’s actually a snap.

Then he gets you to create tables and columns (fields) within that database. Warning. Don’t correct the typo on one of the screenshots and name the tables and fields EXACTLY as on the screenshots.

Next Bob tells you he’s got a file you can import with all the layouts already done. Turns out the file supplied is slightly different than what he supplies and has non-fatal differences in its effects. (Chances are these things will get fixed in a forthcoming revision).

I’m now on page 42 of this 146 page opus. By the way I’m identifying the pages the way Acrobat identifies them on screen, rather than the printed page number in one corner of the page.

I’ve imported Bob’s version (had to delete my own in order to do it; don’t fully understand that dynamic, but it works). Bob has forms that look like dead ringers for the FMP version.

However, I really want some hands on experience building a form from scratch. Therefore I create a new form and name it “contact_main2”, to distinguish it from Bob’s “contact_main”. Bob helpfully supplies a grid of properities for all the objects on these forms for those who want to “roll their own”.

Here’s my current puzzlements. I welcome your help in shining a light into my darkened room.

  1. Bob says the Form’s “title Text” property should be “Contact Main”. However, when I double click on that property I get a dialogue similar to FMP’s Merge dialogue. A bug? I can send a screenshot to those interested.

  2. Bob calls for a background of "Colour = Red:255, Green:255, Blue, 255.

However clicking in the property brings up a colour picker. I don’t see a way of defining colours by number. That should be possible but I don’t see the settings to let me enter this by text.

  1. Bob calls for a Rectangle of size 612, 15 and location 0, 19. I don’t see any vector drawing tools. I can place some text and revise that but no rectangle drawing tools.

Again, I’m sure there here somewhere but they’re eluding me. (It’s dark in here, I’m a stranger to these parts.)

Whoops! I’ve an answer to my own question. From the View menu → Toolbars → Draw brings up a drawing palette.

Okay, it’s getting late. For those that are interested I’ll continue this diary tomorrow into the world beyond page 42.

Morley Chalmers

In less than 12 hours, 23 lookers, which indicates there’s a fair amount of traffic in this corner of the Forum.

But no reactions, no answers to questions posed. It would be helpful if some of you said something.

As I proceed with the tutorial, I’ll be posting today’s commentary towards the end of Tuesday.

I have recently started using servoy and come from a filemaker background. I am aware of the tutorial, but have not downloaded it. You are correct about servoy not being very forgiving, but that is the case with most other development enviroments. That is why they are so powerful.

I do not take a traditional approach to development, but the best way I found to learn was to start developing and use the advanced programers guide. I have had a few problems along the way in regards to my coding practices, but that is to be expected.

There has not been a problem I could not solve yet utilizing the forum, help and reference guides.

Like I said, the best way for me to learn servoy was (is) to apply it practically, by building a solution that replicates some of the functions of your FM solution.

I am sure when you are up against the wall trying to figure out a particular fuction, you will find the answers you need through the available resources.

I must say that I have posted simple questions and extremely talented developers have taken their time to make sure I understand even the most simple concepts. In one case, I was provided sample code showing me how to make a dynamic SQL query and format the results in html. I am waiting for them to kick me off the forum for asking simple questions.

Once you get your feet wet, I think you will find servoy an amazing, powerful tool.

I know I did not really address any of your issues, but like you I want to know how things work not just seee them work. That is why I like to just start building samples that address certian fuctionality.

Good Luck,
Erich

Hi Erich

Thanks for the response. Since I’m about to embark on building a very large solution I felt it best to get my practice licks down before making some poorly chosen assumptions in the real thing. I suspect you’ll see me on the Forum often in the coming months.

I’ve already read every page of the Developer manual (version 1). With me, things don’t really stick until I actually use them. Which is why working through this tutorial is invaluable.

As anyone reading my commentary must have noted, there are some bugs in the tutorial. Nothing that can’t be fixed in a subsequent release. Hope Bob or someone takes the time to polish it.

Along the way I’ve discovered some Servoy bugs. You can find those postings in the “Issues & Bugs” area of the Forum.

I’m continuing to make notes and will post more commentary here late Tuesday.

Kind regards,

Morley

As promised here’s some more diary notes on working through Bob Cusick’s FMP to Servoy tutorial.

On launching Servoy (Servoy Developer Version R2 2.0.3-build 276 Java version 1.4.2-34 Mac OS X) I find the View, Select, Methods and Window menus all greyed, both in Design and Ready modes. Nothing will shake this condition loose. Reboot Servoy and now Select and Methods are greyed, the rest available.

Not sure what that was about, but I can now work again.

I’m using Bob’s grid of element properties on Page 43. Using the Properties area to set the characteristics of elements is excellent. I can see once working this way becomes familiar it could be both fast and very accurate. Somewhat like using the placement palettes in QuarkXPress. Working this way I’m stumbling upon some tricks. This has been very intelligently thought out. However, I do wish Bob had walked through at least an introduction to using these tools.

I highly recommend creating a layout like this from scratch, from a set of formula such as Bob’s. I’m picking up numerous ideas for my own product. Not that it will look in the least like this one. As tedious as this is, this is a worthwhile exercise.

I do wish Bob had built his properties grid in the same sequence as is used in Servoy.

What’s LAF Default? It turns up in many places in properties. What do the initials stand for, where is it set?

Can I duplicate a label? That would be a fast way of generating very similar elements, then editing. Doesn’t appear so. Haven’t found tools to enable that.

Ah ha! Bob tells me the solution (much further down). And it’s obvious. Just copy and paste and then change the specs. Still, a duplicate element keyboard command would make that a single click rather than two.

Bob has some anchor settings for many of the layout elements. Viewing the result in Ready mode is interesting. Bob’s asked for the Address Labels to anchor right, the View Contact List and separator to anchor left. However if you set all three to anchor right they jump to the far right of the screen, whatever the size the user has modified his/her window. Nice. I suspect there’s a place to automatically size the window on opening to 100% or some percentage of monitor width. Hope so.

It’s interesting to bring in on screen graphics for buttons as “Labels”. I suppose that’s what they actually are, but I had to do a mental jump beyond my more narrow interpretation of that term.

I’m somewhat puzzled by the order of elements in the Properties panel. They seem arbitrary, not thought out. Rolloverimage one would think would follow ImageMedia and MediaOptions to follow that. Size and location are also separated. Horizontal and vertical alignments are widely separated. If there’s a logic to the current order, it escapes me. Also, when tabbing through the properties panel it tabs into the property name as well as into the value field. One would think to facilitate keyboard entry it would jump directly into the value fields one after the other, selecting the current values as it does. Current version doesn’t select the field values to facilitate keyboard entry.

Placing element after element like this is tedious. Wish I knew some productivity shortcuts. Such as duplicate a very similar element and then modify. At some point I should learn how to set defaults.

I’ve discovered that tabbing in the RGB colour picker jumps to both the sliders and the fields. IMHO, shouldn’t. In addition, when jumping into editable fields they should be selected. Should facilitate keyboarding the values. Should I report this as a bug? IMHO, it is. About the sliders. Sometimes they will jump directly from 236 to 238 and just won’t let you nudge it to 237. At other times they will. Is inconsistent.

In defining rectangles, Bob sometimes asks the user to set the colour of the line and then set the same values for foreground and background. In my experiments on a rectangle of 1 depth (i.e. a line) it doesn’t make any difference. Why doesn’t Bob use the line tool? Dunno.

I’m also finding it very difficult to click on and select an object, particularly lines and 1 pixel depth rectangles.The trick I’ve found is the “hot” spot of the selection tool is not actually on the tip but about three pixels back. That’s a productivity hazard if that can’t be fixed.

Bob asks you to add the Servoy equivalent of FMP’s “merge” fields for first and last name and company name. However, although I’m fairly sure I’ve followed instructions closely, when I create a record and add values into those fields, my form doesn’t display them. Yes, I’ve gone back and doubled check. My settings are exactly the same as Bob’s. Must be some other factor at work.

I’m puzzled as to why Servoy uses the term “Data Provider” when, as far as I can tell, it really means “field” or “column”. Too many terms for the same thing is clutter, IMHO. Column is probably a very old term which made sense when you were literally looking at a grid. Field seems to be t, “field” and “column”?

All right, I’ve reached page 48, rolled my own. Comparing my results with Bob’s on page 48, the first name, last name and company name fields don’t display in the large purple type. Instead I’ve got %%first_name%%, etc. Passing my mouse over the New, Delete and Find buttons causes the images to jump sideways about a pixel, possibly two. (I’m using Bob’s supplied graphics). The eMail button is better. A rollover outlines the icon, subtle, just enough visual cue to confirm but not grab attention, nice.

Now it’s on to the Tab Panel at the bottom of the page. Here’s where things get interesting because I’m blind sided by tab panels. I’ve fiddled around with them and I just can’t seem to get them to work. Let’s see if Bob can illucidate.

More later.

Hi, interesting monolog you;ve got going on here… :D

Just a few answers:

  • LAF Default = Look And Feel Default. In Servoy it’s possible to have more than one lookf and feel. Search the forum for more info

  • Servoy has “things” called dataprovider, because it seems a more appropriate naming. Yes, a dataprovider is often a field in a column in a table, but is can also be a (stored) calculation, or a global variable

  • Duplicating elements is (IMHO) simple. Select the element, press Ctrl-C (copy) and then Ctrl-V (paste) and you’ve duplicated your element

  • As for the merge field showing %%first_name%%: Is the displayTags property of the element set to 1 (flagged, yes etc…) in the PropertyPanel?

Paul