Identify Built-in objects with VBA - vba

Is anyone aware of any means to test if a View, Table or Filter is part of the 'Built-in' set?
I can't see nor find any obvious way of doing this so will build some collections that hold the names of these items so that i can avoid these in code, but it feels like there should be a property that identifies these..............

There is no "built-in" property.
Furthermore, Views, Tables, and Filters can be modified and/or deleted by the user so even if you find a view called "Gantt Chart" it may not resemble the standard (default) view. You can build a list of view names, but don't count on one in a user's file being the same as in any other file.

Related

AEM custom table without html and saving each cell individually

I am trying to have a table like view for my component, however I don't want to use the table component. Since, the table will save the data as html with tags and its difficult for me to read the data inside the rows. Traversing through or and so on.
If not, I was thinking to have a multifield component, which has one set header (for table header row) and the rest of the fields below will be mutlifield, we can keep adding as many rows as we want.
At present, i have something like
Name - value
Path - value
Type - value
The above entire thing is one value in the mutltifield. I can add multiple fields like the above.
but the ui looks clunky if we do it this way. I'd rather have a table like format.
if anyone has any suggestions I'm open to them.
Thanks
Your best bet will be to use CSS to override the look and feel for your custom multi-field and AEM's multi-field management UI.
You can probably make it look and feel like a fluent grid by changing the spacing between the edit fields and dimming the borders.
Making one monolithic custom extension to look and feel like a grid/table will be too complex and introduces the risk of deviating from node structure so I won't recommend that unless you are planning to take over the component's properties dialogues in authoring mode.

Whats the difference between tiles:insertTemplate and tiles:insertDefinition

tiles:insertDefinition and tiles:insertTemplate both has putAttribute , i am not understanding the difference between the two.I am using tiles 2.x version.
thanks in advance
kranthi
A template is a view which expects to be supplied attributes while definitions are named instances of a template defined in tiles.xml (or pragmatically using the API).
tiles:insertDefinition requires the name attribue to be set, because you are inserting a defintion you have layed out in tiles.xml.
tiles:insertTemplate creates a new definition on the spot, from a view and expects you to insert values at that point. It requires the template parameter be set, there is no name attribute.
In general I don't think you should need to use either of these tags often (you can create tiles using applications without ever using either). Avoiding their use means having all definitions clearly laid out one place AND being able to see how all definitions fit together.
This central view is tiles greatest strength which these tags can undermine.
tiles:insertDefinition still means using named definitions, there is still one central location were all layout is controlled but because we are inserting the definition within a view we loose our overview of how everything fits together.
tiles:insertTemplate is akin to a JSP include, you are creating a new definition at that moment in the view and use it. This tile is not part of the overarching view.
In case the argument was not clear, JSP includes can achieve the same reduction in boiler plate code as Tiles can. It is the overarching view which tiles provides that allow you to easily change page structure across the whole application easily. Carefully consider that this is not being undermined.

Loading and Caching Time-based Data

I'm looking for a good way of caching event entries from a big database so that it's not necessary to load the whole database but only timeframes which contain entries which are currently displayed, selected or otherwise needed. Are there classes in Cocoa or Objective-C programming pattern which provide support to implement this?
I have a property database which pulls down list of available properties for sale. The easiest way I found to do this, was to have a date attribute which gets set when the data is first populated. From then on, only the objects which have a time that's expired are updated when someone attempts to view a property. This was the easiest way I found to control the outcome.

Best Data Structure for list of parts with assemblies, sub-assemblies, and such in VBA?

I'm working on a project that is basically a hack on top of a hack on top of an excel sheet and unfortunately we don't have time to re-factor but the core code simply isn't fast enough.
We have assemblies which are made out of sub-assemblies and parts. So an assembly is the super structure and a part is the smallest structure.
We have a BoM, bill of materials, that we put into Excel through various methods (manual, import, parse... etc) and this is put into a tree structure, not a heap, a tree.
My problem with this is, the parts don't need to be in any particular order, they do need to be searched but I don't see any advantage to having this as a tree.
I thought a better structure would be a Linked List within a Linked List within a Lin... so on and so forth.
Can anyone suggest a better approach?
EDIT FOR MORE DETAIL:
Assemblies have several properties such as mass, cg, inertia, so on and so forth, they are objects that should point to several other objects parts, which have the same properties as assemblies and more. Assemblies can also contain other assemblies.
It's possible to set up a series of dependant Lists, eg select item "widget" in List1 and List2 is populated with all the items that pertain to item "widget", and so on. Search "Conditional Lists" and possibly "dynamic names" in one of the main Excel groups for examples. Typically these are used with a series of DropDowns. Problem is, depending on respective list sizes and numbers of branches, you can quickly end up with something very difficult to manage. An alternative approach is a relatively simple database. A single list of parts, with description and number, each having one or more categories, a category could point to a "parent" part. You can then filter on the categories.
Not sure what the overall objective is apart from merely "search". Excel does that pretty fast itself, even with large non-sorted lists.
It is possible to use ADO with Excel. A table can be a whole sheet, a range or a named range. You have the power of the Jet engine, so you can run any query that the engine supports, including the use of JOINS and sub queries.

SQL query to avoid fetching the entire nested set when parts of it are collapsed by the user

I'm trying to tie django-mptt and contrib.admin together by providing something friendlier than a flat list in the admin. Because the trees are supposed to be large (otherwise i wouldn't be using nested sets), users should be able to expand and collapse parts of it.
When a user expands or collapses or expands a branch (ajax is used for that), a cookie is also set containing a comma separated list of collapsed branches. This way, next time this user visits the admin for my django-mptt powered model, i can show him the tree in the exact state he left it. Now i would like to use this list of collapsed branches to ease the burden on my database by fetching only needed parts of the tree.
Is there a way to do this effectively? The solutions i googled were making a query for each branch so they could avoid querying when a branch was collapsed, but that doesn't look very effective to me. Maybe it is possible with a fixed number of queries?
You're not really explaining what you're doing, so it's a bit hard to help. (What are you doing with the tree? How are you displaying it? What do you want the users to be able to do?)
Each element in a Django-MPTT tree has a get_children() method - and using the optional include_self=True parameter you can get a list of the element and all its children. You can use this to pre-filter subtrees so that you only display parts of it, if that's what you want.
If you want users to be able to dynamically expand and collapse parts of the tree without reloading the page, you will need to use AJAX. There are various AJAX-enabled treeview controls around - I've written one myself using jQuery - and no doubt one of them will do something along the lines of what you want.