Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Help plan the agenda for the Developer Summit InDesign Hands On Session

Guest
Apr 19, 2010 Apr 19, 2010

At the 2010 Creative Suite Developer Summit on May 4th, we will be hosting a session titled "InDesign CS5 Hands-On".

This two-hour session will be for developers to discuss issues they are facing with the InDesign SDK. A team of engineers will be hosting the presentation, and will work through issues.

To make the session most valuable, we would like to know some of your questions beforehand. I've started this thread as a place to have this discussion. Please - post your questions that you'd like us to address at that session.

OK - go! What do you want us to talk about at the InDesign CS5 Hands-On at the developer summit?

mnr

TOPICS
SDK
2.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Apr 24, 2010 Apr 24, 2010

I take the first half hour 😉 for error handling.

It is a frequent request from customers to implement dynamic constraints to arbitrary model changes. SuppressedUI is a distantly related sledge hammer approach, but incomplete and inappropriate as it just pulls the general plug.

To simplifly matters, I'd pick two example model changes.

The first is to constrain a subset (e.g. by label) of page items to be fully contained within the upper half of their spread.

Let me repeat this is just an example, the constraints could be anything else. Functionality to only touch very shortly would therefor be

- how to overload existing trackers (donut ...) that they still work, but obeye the constraints on such page items

- a selective custom snap / grid behaviour

The larger focus of the discussion would be at the command processor. A variety of commands may cause a violation of the constraint, and some of them are observable by IID_ITRANSFORM_DOCUMENT. An observer could wade through all those notifications, watch out for our special page item, and wish to veto some of the changes.

The direct approach (in theory) would raise an error condition straight from the notification, and expect the command processor to detect the transaction failed and roll back everything. The UI gesture that caused the command finally picks up the error code and displays the matching error message.

The discussion gets into detail why this is a bad idea. It shows how simple functionality is still distributed across nested commands and sequences of subcommands, with unhandled error codes all over the place and boom you find yourself in a protective shutdown.

Examples for such nested command situations, beyond IID_ITRANSFORM_DOCUMENT

- an inlined page item wich is pushed across the border by typing

- place by drag and drop copy

- modifying an object style causes a wider stroke

- changing the shape of the page item

Then - and that is the actual question, so please major focus here - it would show the alternative approaches how to veto such commands.

Given enough time, the second constraint would apply the principle to rendering objects, aka swatch. It would constrain use of a set of swatches to specifc page items (for simplification the swatch must not show up in text at all, e.g. as rule above stroke gap color ... ).

The focus here would be a discussion of reference indexes - how custom (thus unknown) swatch consumers participate in that mechanism and how to veto their operations if they violate our constraint.

Dirk

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Apr 25, 2010 Apr 25, 2010

The selection architecture is also a welcome area for explanations.

Continuing from the previous problem, we could get an idea how to add input parameter validations to selected suites. For example, it should be possible to insert an own level of indirection in between ASB and CSB. Most Suites would just pass on in a similar manner as ASB implementations, so the boss would be derived from kIntegratorSuiteBoss. For the actual validation some Suites would have their Can() or Do() methods overloaded. To get this working I just have not yet found a way to add my boss to the chain - e.g. a kind of suite filter factory service.

Less sophisticated - what is the correct way to implement temporary selection state that is bound to the presentation (window). In other words, a concept such as "active layer", which is per layout window. The discussion would explain where in the selection architecture the storing interface should be held (on the window boss, layout widget or within the associated CSB?), what relevant notifications to use (is ILayoutAction really a good idea, or better use SelectionExt startup?). Which observer should maintain the value (e.g. should it be bound to a panel, if the value is also scriptable?). How to access the value from the CSB side of custom suites - especially if the LayoutWidget is chosen to hold it. Is there a better way than to ask users to grab the "selection owner" off the ISelectionManager at the ASB side, and pass it through in the method? In my opinion this additional parameter exposes an implementation detail in the suite methods that does not belong there.

Let's continue with such unknown gems like the idea that suite bosses need not be bound to selections. It should be possible to create your little own kLayoutSuiteBoss, let it do some high level work and go away. This should even work in InDesign Server. The use case for kTextScriptingSuiteBoss is a good example.

The selection topic would be finished with a description how to implement a DIY concrete selection boss, so that it is associated with your custom presentation window (e.g. what you did to introduce galley view). I think the interface of the relevant service is missing from the SDK, are there alternatives or at least plans to publish it?

Dirk

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Apr 25, 2010 Apr 25, 2010

In the UI department, I'd love to here more about IID_ITEXTTARGETSERVER. Unfortunately the plugin where I will need it has not yet evolved far enough, so I can not yet offer concrete questions. Let's begin with an overview why/when it is important (used all over the place). A list of do's and dont's, common pitfalls and so forth would be interesting.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 25, 2010 Apr 25, 2010

In the name of all those who won't be able to attend and have benefited from Dirk's help time and again, I'll second all Dirk's requests. The only one that has really given me fits is the IID_ITEXTTARGETSERVER issue, how it works, and how to integrate with it. The rest is above my head for now. Maybe if Dirk gets it clear, he will help us all out.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Apr 25, 2010 Apr 25, 2010

Next one in UI: Drag and Drop from outside.

Specialties in this situation are

  • you can't control the flood of flavors produced by the external application(s) - e.g. the gang of internet browsers.
  • the greatest common denominator may be the text flavor
  • text flavor may be irrelevant but haunt you from now on

The introduction would

  • list the cascade of overloading opportunities
  • which internal helpers will compete with you
  • and how to knock out the competition

The most relevant decision - to go with kSysFileDataExchHandlerHelperService rather than kPageItemDataExchHandlerHelperService as suggested by the custom DD example, has to be enforced when the data object is not even internalized. Knowledge of flavors is just not enough here. Did I miss a service here that would allow me to preprocess the data object, and strip + add flavors?

The decision for the actual kLayoutDDTargetFlavorHelperService is not directly accessible, instead there is an indirection thru the second level (the multiple HandlerHelperServices). Is there a way to enforce the priority of the FlavorHelperService short from covering every competing HandlerHelperService?

My approach with a kSysFileDataExchHandlerHelperService is also consequence that the example leaves the visual drag effect as an exercise. As I understand it the drag effects are not separately factorised, but implemented at the level of the respective kLayoutDDTargetFlavorHelperService, so your flavor helper can't just build a package matching the decoded part of the data object, and throw it at a service to make it behave like the place gun. Am I wrong with that?

Btw, another reason against kPageItemDataExchHandlerHelperService and thus kLayoutDDTargetPageItemFlavorHelperBoss - it causes a visual smear (ghost of the spline on the first drop candidate location), as you can see from drag&drop of a library item.

Dirk

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 27, 2010 Apr 27, 2010
LATEST

Not sure of the protocol but am definitely interested in hearing more about DnD from outside of InDesign. I have DnD working but maybe not in the best possible way.

My other area of interest is the Links architecture and I must admit that I don't have a full understanding of all of the ways it can be used to help me and my customers.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Apr 25, 2010 Apr 25, 2010

Actually I got a bit carried away because the time is running for final preparations and nobody else has picked up this thread. Remember that it won't be my private session - please add your own questions at whatever level you feel comfy with. I think the session will be recorded and made available on the web, so everybody should benefit from more general questions. My esoteric problems may also be covered in the coffee break.

Dirk

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines