Giter Club home page Giter Club logo

press-sdk's People

Contributors

jcmoraisjr avatar silvioprog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

press-sdk's Issues

Pequeno bug no parser do InternalQueryItemsDisplayNames

Johnny, há um pequeno problema quando se usa o caractere "(" para título das colunas do grid. O Press se atrapalha e acaba colocando aspas no começo da string que deveria ser usada como DisplayName e corta a string na posição do caractere ")".

Este não é um problema grave, dá pra ser tranquilamente contornado. Apenas abri esta issue pra deixar registrado.

Forte abraço.
press_issue_internalquerydisplaynames

BulkRetrieve limitation

Converted from SourceForge issue 2359690, submitted by jcmoraisjr

BulkRetrieve doesn't retrieve unloaded attributes (lazy loading) of proxies with an instance. Eg:

Session.BulkRetrieve(ProxyList, 0, Count, 'attr')

instances are skipped, because of that it doesn't retrieve the 'attr' field of instantiated objects.

Default value based on other value

Converted from SourceForge issue 2057241, submitted by webcss

Is it possible (if not already implemented) to set default values based on other values, e.g.

setting an orderitem's price based on the product choosen?

(sorry, cannot reach either of the mailing lists, mail is returned saying list not active)

[Feature] Complex Queries and MVP

Converted from SourceForge issue 2099874, submitted by webcss

Sorry for still using SF Tracker over mailinglists, but this postmaster thingie won't work ;)

Is it possible to access Objects involved in the MVP in a direct manner, thus I can formulate a complex query by code or manipulate items by code in an easy way and all this is reflected via MVP?

[Feature] Data packet

Converted from SourceForge issue 2359644, submitted by jcmoraisjr

Create a data packet object which holds persistent data of a business object.

  1. Lifetime

Starts with object retrieving or storage of a non persistent object (against a session) and finishes when the object is destroyed (notification event? direct event?)

  1. Home

A data packet is a session object. TPressSessionPacket or TPressSessionObject are candidates to the name of the class.

  1. Usage

Stores the persistent id and update count properties.

Stores the state of the object. The data packet need to know if the object wasn't changed, or if the change is relative or not.

An object that has a data packet object is a persistent one, otherwise (an object without a data packet) means the object wasn't persisted. A session is able to query the persistence state of an object.

The data packet also need to listen proxies and proxylists in order to instantiate class/id, or bulkretrieve on demand. When assigning a reference to a proxy, the session need to make a data packet to listen, or listen itself the proxy events in order to instantiate object(s) when necessary.

  1. Cleanup of the Subject unit

Remove static public procedures, IPressSession interface, TPressObject.IsUpdated property, as well as PersistentId and UpdateCount params.

  1. Refactor

InternalStore/Refresh/Dispose need to be refactored. An option is an interface that a BO implements in order to be notified of such events. Another option is use notification.

Tipo Currency e PostgreSQL

Olá João, acho que encontrei um pequeno bug no PressObjects.

Para reproduzir a condição do problema, é fácil.

Basta criar uma classe, com pelo menos 1 atributo TPressCurrency e estar usando o PostgreSQL como servidor de banco de dados.

Inserir um registro novo e ao salvar, esta mensagem de erro aparece:

Preparation of query failed. (PostgreSQL: ERROR: column "cost" is of type numeric but expression is of type money
LINE 1: ...money,int,bigint) as update TEquipment set Cost = $1, Update...
^
HINT: You will need to rewrite or cast the expression.
).

Creio que seja um problema do framework, pois alterando o tipo do atributo pra TPressDouble, o problema sumiu.
Entretanto, ainda sou novato no PostgreSQL e não sei se falta configurar algum parâmetro que envolva campos numéricos usados para valores monetários.

Selection issue

Converted from SourceForge issue 2388643, submitted by jcmoraisjr

The order of the items of a selection is, currently, determined by the order the items was selected, instead of the order of the items in the container.

AV inside notification

Converted from SourceForge issue 1519345, submitted by jcmoraisjr

Notifications raises AV exception after unassign
duplicated events. The
TPressNotificationList.RemoveNotification remove only
the first occurence, resulting some invalid pointers.

ID Generation

Converted from SourceForge issue 2052915, submitted by webcss

Using either GUIDs or DB-Generators will cause an exception on foreign key references for newly added Objects when they contain a TPressPart Attribute.

Solution: generate ID from bottom up, e.g. for a Person with an Address Part:

Generate the Persons ID prior to the Address ID

AV adding an invalid Proxy into a ProxyList

Converted from SourceForge issue 1527511, submitted by jcmoraisjr

Whenever an invalid Proxy is assigned to a ProxyList,
eg, a Proxy referencing a class that isn't allowed to
that List, the framework raises an AV due to an object
destroyed inside the ProxyList notification.

Simply removing the try/except block solves the issue,
but might cause memory leakage.

Encoding of resource string files

Converted from SourceForge issue 3056022, submitted by joaolevada

Hello Morais.

I saw you've changed PressMessages.inc to fix charset issues with FPC, calling the PressEncodeString function.

That looks ok. But it's missing an update on resource string files. They're still on CP1252 codepage, and that's end on corrupted strings after the PressEncodeString function.

Can you verify this?

I've personally checked the PressMessages_ptbr.inc file.

Let me know, if I can help somehow.

[Feature] Proposal of property addition on TPressObject/TPressAttribut

Converted from SourceForge issue 3601245, submitted by None

Hello,
please find attached modified code in order to add :

  • Mandatory property for an attribute
  • Spell checking of attribute content via regular expression (virtual in attribute, implemented in TPressString)
  • Validity check of TPressObject throught validity check of its attributes
  • Error reporting on validity check by attributes and collecting on TPressObject

Hope this could be included in trunk
Regards
Clinique

Notification skipping notifiers

Converted from SourceForge issue 1583538, submitted by jcmoraisjr

When a notification causes a notifier destruction the
next notifier isn't called, because after it's
destruction, the "next" will be the "current" item:

with CurrentItem.Notifiers.CreateIterator do
try
BeforeFirstItem;
// 2nd - skipping the current and not processed
while NextItem do
// 1st - removing the current notifier
CurrentItem.ProcessEvent(AEvent);
finally
Free;
end;

menu shortcuts not displayed/assigned

Converted from SourceForge issue 2073074, submitted by webcss

Shortcuts musst be localized as well, e.g.

on an english system PressWidgets.Short('Ctrl+Ins') is corresponding to PressWidgets('Strg+Einf') on a german system.

Solution: move Shortcuts consts to messages unit.

Metadata

Converted from SourceForge issue 2052913, submitted by webcss

Custom Attributes are not accepted by Metadata as it is described in the WIKI.

E.g. assuming a CustomAttribute TPressPercentageValue

'Discount: TPressPercentageValue;' won't work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.